package com.zhongjian.technologycal.mall.adapter;


import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.zhongjian.technologycal.mall.activity.main.fragment.ProductFragment;

import java.util.List;

/**
 * Created by wei on 2017/11/23.
 */

public class ProductViewPagerAdapter extends FragmentPagerAdapter {

    private final int PAGE_COUNT = 3;
    private String[] tableTitle = new String[] {"商品","详情","评价"};
    private Context mContext;
    private List<Fragment> mFragmentTab;
    private ProductFragment mSeminarFragment;


    public ProductViewPagerAdapter(FragmentManager fm, Context context) {
        super(fm);
        mContext = context;
    }

    @Override
    public Fragment getItem(int position) {
        return ProductFragment.newInstance(position+1);
    }

    @Override
    public int getCount() {
        return PAGE_COUNT;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tableTitle[position];
    }


}
